/*
----------------------------------------------------------------------------------------------------
This source file is part of the Senbotsu Project
Copyright (c) 2007 by Ryan Holcombe

This program is free software; you can redistribute it and/or modify it under the terms of the GNU
Lesser General Public License as published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
----------------------------------------------------------------------------------------------------
*/

#include "goEntity.h"

// -------------------------------------------------------------------------------------------//
goEntity::goEntity() : 
	mEntity(0), mNode(0)
{
	mName = "Knight";
}

// -------------------------------------------------------------------------------------------//
void goEntity::tick(double elapsed)
{

}

// -------------------------------------------------------------------------------------------//
void goEntity::load(const std::string& file, Ogre::SceneManager *pSceneMgr)
{
	try {
		mEntity = pSceneMgr->createEntity(mName, file);
		mNode = pSceneMgr->getRootSceneNode()->createChildSceneNode();
		mNode->attachObject(mEntity);
	} catch (Ogre::Exception &e) {
		throw Gamut::Exception("goEntity::load", "Unable to setup entity, Ogre Exception: " + e.getFullDescription());
	}
}

